package cn.sunchis.demo.distributed.lock.server;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * 
 * @Author 许亮
 * @Create 2018-9-4 21:17:39
 */
@EnableEurekaClient
@SpringBootApplication
public class DistributedLockServerApplication implements CommandLineRunner {
	/**
     * 程序入口
     * @param args 启动参数
     */
	public static void main(String[] args) {
        SpringApplication.run(DistributedLockServerApplication.class, args);
    }

	@Override
	public void run(String... args) throws Exception {
		
	}
	
	@Bean
	@LoadBalanced
	public RestTemplate restTemplate() {
		return new RestTemplate();
	}
}
